/**
 * @type {Number}
 *
 * @properties={typeid:35,uuid:"322AFE08-81CA-4B35-A0FE-D21C6A524B12",variableType:4}
 */
var fAnulaBorra = 0;

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"47057730-E524-41F3-BD35-5696BE927E7D"}
 */
function cancelar(event) {
	var $win = application.getWindow('facturas')
	$win.hide()
	$win.destroy()
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"F6AFDF67-D8B5-41C6-813B-C0F2EFBBF019"}
 */
function borrar(event) {
	fAnulaBorra = 0
	var $resp = globals.DIALOGS.showQuestionDialog('Confirme','¿Confirma la baja?','Si','No')
	if ($resp == 'Si')
		globals.gBajaFactura()
}

/**
 * @properties={typeid:24,uuid:"F7B7A90D-1795-4D08-8F3C-D2E04883D081"}
 */
function anular(event) {
	fAnulaBorra = 1
	var $resp = globals.DIALOGS.showQuestionDialog('Confirme','¿Confirma la anulación?','Si','No')
	if ($resp == 'Si')
		globals.gBajaFactura()
}
